/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package backing;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;

/**
 *
 * @author XJ
 */
@ManagedBean
public class StudyBacking {
    @ManagedProperty(value="")
    private String name;
    @ManagedProperty(value="")
    private int ID;
    @ManagedProperty(value="")
    private String phone_num;
    @ManagedProperty(value="")
    private String position;
    @ManagedProperty(value="")
    private String work;
    @ManagedProperty(value="")
    private String detial;
    @ManagedProperty(value="")
    private String destination;
    @ManagedProperty(value="")
    private String time_span;
    @ManagedProperty(value="")
    private String money_source;
    @ManagedProperty(value="")
    private String reason;
    @ManagedProperty(value="")
    private String leader_opinion;
    @ManagedProperty(value="")
    private String president_opinion;
    @ManagedProperty(value="")
    private String school_opinion;

    @ManagedProperty(value="")
    private String decision;
    
    private String[] disabled=new String[4];

    public String getDecision() {
        return decision;
    }

    public void setDecision(String decision) {
        this.decision = decision;
    }

    
    public StudyBacking() {
    }

    public int getID() {
        return ID;
    }

    public void setID(int ID) {
        this.ID = ID;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public String getDetial() {
        return detial;
    }

    public void setDetial(String detial) {
        this.detial = detial;
    }

    public String getLeader_opinion() {
        return leader_opinion;
    }

    public void setLeader_opinion(String leader_opinion) {
        this.leader_opinion = leader_opinion;
    }

    public String getMoney_source() {
        return money_source;
    }

    public void setMoney_source(String money_source) {
        this.money_source = money_source;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone_num() {
        return phone_num;
    }

    public void setPhone_num(String phone_num) {
        this.phone_num = phone_num;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getPresident_opinion() {
        return president_opinion;
    }

    public void setPresident_opinion(String president_opinion) {
        this.president_opinion = president_opinion;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getSchool_opinion() {
        return school_opinion;
    }

    public void setSchool_opinion(String school_opinion) {
        this.school_opinion = school_opinion;
    }

    public String getTime_span() {
        return time_span;
    }

    public void setTime_span(String time_span) {
        this.time_span = time_span;
    }

    public String getWork() {
        return work;
    }

    public void setWork(String work) {
        this.work = work;
    }

    public String[] getDisabled() {
        return disabled;
    }

    public void setDisabled(String[] disabled) {
        this.disabled = disabled;
    }
    
    public String setPermission(){
        String[] s={"false","true","true","true"};
        this.setDisabled(s);
        return "study_opinion_form";
    }
    public String commitForm(){
        String outcome=null;
        return outcome;
    }
    
    public String fillForm(String s){
        if(s.equals("apply"))
            this.setPermission();
        return "study_opinion_form";
    }
}
